package com.matt.repository.nursery;

import com.matt.domain.nursery.NurseryScheduleTemp;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * *******************************
 * Created by lch.
 * form com.matt
 * on $date$
 * *******************************
 */
public interface NurseryScheduleTempRepository extends JpaRepository<NurseryScheduleTemp, String>, JpaSpecificationExecutor<NurseryScheduleTemp> {

    List<NurseryScheduleTemp> findByAreaId(String areaId);

//    @Transactional
//    @Modifying
//    @Query(value = "delete from nursery_schedule_temp where id=:id",nativeQuery = true)
//    int deleteById(@Param("id") String id);

    NurseryScheduleTemp findByIdAndStaffId(String id,String staffId);

}
